package com.candy.testofjava0519;

import com.candy.bean.Person;

/**
 * @author donglin
 * @Title:
 * @类名: TestOfPerson
 * @date 2020/5/19
 */
public class TestOfPerson {
    public static void main(String[] args) {
        //使用无参构造创建一个person对象p1
        Person p1=new Person();
        //使用全参构造创建一个person对象p2
        Person p2=new Person("凤九",22,false);
        //为对象p1的属性赋值
        String name=p1.name="东华";
        int age=p1.age=25;
        boolean sex=p1.sex=true;
        //调用sayHi方法
//        p1.sayHi(name,age,sex);
        System.out.println("===============================");
        p2.sayHi();
        p1.sayHi();
    }
}
